class Message < ActiveRecord::Base
  depends_on :content, :attrs => [:name, :url], 
             :as => :presentable, :dependent => :destroy

  validates_presence_of :body

	def self.find_active
		find :all, :conditions => "expires_on >= '#{Time.now.to_date}'"
  end
end
